import React from 'react';
import { connect } from 'react-redux';
import { View, Button } from '@tarojs/components';
import Taro from '@tarojs/taro';

import './index.scss';

const UnusualContain = ({ classes = '', unusualInfo = {} }) => {
  const refreash = () => {
    Taro.reLaunch({ url: unusualInfo.route });
  };

  return (
    <View className={['totalPage_unusualContain', classes].join(' ')}>
      <View className="imgArea">
        <View className="text">{unusualInfo.tip || ''}</View>
      </View>
      <Button className="btn customePageBackgroundStyle" onClick={refreash}>
        刷新
      </Button>
    </View>
  );
};

export default connect(() => ({}))(UnusualContain);
